<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * 团购信息从表
 * @ author: zuorenci
 * @ email: 904725327@qq.com
 * @ date: 2017/10/24 21:01
 */
class Notice extends Model
{

    protected $table = 'notice';

    public $timestamps = false;

    protected $primaryKey = 'notice_id';

    protected $fillable = [
        'notice_id', //主键ID
        'title', //标题
        'cate_id', //行业
        'type', //团购类型 1为套餐 2为代金券
        'order', //排序
    ];
    /**
     * 关联团购从表
     * @ author: zuorenci
     * @ email: 904725327@qq.com
     * @ date: 2017/10/24 21:01
     */
    public function NoticeInfo()
    {
        return $this->hasOne('App\\Models\\NoticeInfo', 'notice_id', 'notice_id');
    }
}
